module.exports = class {
	constructor(){

	}
	module(data){
		
	}
	controller(data){
		console.log(`${'动作'.padRight(15)}\t描述`.cyan);
		console.log('-'.repeat(80));
		for(let item in data) {
			if (item === 'default') continue;
			let helpitem = data[item];
			if (typeof helpitem != 'object') continue;
			console.log(`${item.padEnd(15)}\t${helpitem.description||''}`)
		}			
	}
	action(data){
		let helpitem = data;
		console.log(helpitem.description);

		console.log(`${'参数'.padRight(15)}\t${'必须?'.padRight(10)}\t${'值'.padRight(20)}\t描述`.cyan);
		console.log('-'.repeat(80));

		for(let item of helpitem.params){
			let required = (item.required || typeof item.required === 'undefined') ? '是' : '否';
			let value = item.value || '';

			console.log(`${item.name.padRight(15)}\t${required.padRight(10)}\t${value.toString().padRight(20)}\t${item.description}`);
		}
	}
}